package com.hfjyz.expert.expertcall.bean;

import com.hfjyz.base.bean.SearchCondition;

public class ExpertCallSearchCondition extends SearchCondition {

    public String getOrderString(String call, String expert) {
        if (sortColumn == null) {
            return "";
        }
        
        if (sortColumn.equals("expertIdNo")) {
            return " order by " + expert + ".idNo" + " " + sortDirection;
        }
        if (sortColumn.equals("expertName")) {
            return " order by " + expert + ".name" + " " + sortDirection;
        }
        if (sortColumn.equals("expertSex")) {
            return " order by " + expert + ".isMale" + " " + sortDirection;
        }
        return " order by " + call + "." + sortColumn + " " + sortDirection;
    }
}
